Merged
Conversation
ec419f2 to
5abbfba
Compare
igaw
reviewed
Jan 12, 2026
| ops->show_status(status); | ||
| } | ||
|
|
||
| int nvme_show_err(const char *msg, int err) |
Collaborator
There was a problem hiding this comment.
I think this function should not return an error code, so void nvme_show_err.
Collaborator
There was a problem hiding this comment.
I see why you pass the error code back. I think we should follow more the traditional style of
if (err) {
nvme_show_err(err, "oh no!");
return err;
}The rest looks great. Really nice cleanup!
Contributor
Author
There was a problem hiding this comment.
Okay will do fix as mentioned. Thank you.
Contributor
Author
There was a problem hiding this comment.
Just fixed the patch as mentioned. But sorry still nvme_show_opcode_status not added to the nvme_show_err as mentioned by the PR comment: #3056 (comment) so later will do it.
This handles the negative error code and the postive status code. Note: Fix also to handle the negative error for nvme_strerror(). Fixes: 4fb93ad ("nvme-cli: update error handling") Signed-off-by: Tokunori Ikegami <[email protected]>
5abbfba to
9ed7fa7
Compare
Collaborator
|
Very nice! Thanks a lot for this huge cleanup. That is a major improvement of the code! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.